package jobs;

import java.util.List;

import models.Company;
import services.SynchronizationService;

public class SynchronizationJob {

	static SynchronizationService synchronizationService = SynchronizationService.getService();

	public static void sync() {
		synchronizationService.synchronizeGlobalResources();
		List<Company> companies = Company.find.all();
		if (!companies.isEmpty()) {
			for (Company company : companies) {
				synchronizationService.synchronizeResources(company);
			}
		}
	}

}
